Skip to content

fix(scripts): only swallow ENOENT in rees-coverage lcov post-process (#7771)#7812

Closed
RealDiligent wants to merge 2 commits into
JSONbored:mainfrom
RealDiligent:fix/rees-coverage-enonet-7771
Closed

fix(scripts): only swallow ENOENT in rees-coverage lcov post-process (#7771)#7812
RealDiligent wants to merge 2 commits into
JSONbored:mainfrom
RealDiligent:fix/rees-coverage-enonet-7771

Conversation

@RealDiligent

Copy link
Copy Markdown
Contributor

Summary

ees-coverage.mjs used a bare catch {} around lcov post-processing, which swallowed any error — including real writeFileSync failures on an existing report. Only ENOENT (report not generated yet) should be ignored; CI's downstream verify step handles that case.

Fix: extract
ormalizeLcovSfPaths(), re-throw non-ENOENT errors, guard main() behind import.meta.url so tests can import the helper.

Tests

est/unit/rees-coverage-script.test.ts:
  • ENOENT on read → no throw (existing pass-through behavior)
  • write failure → propagates
  • backslash normalization still works

Closes #7771

@RealDiligent
RealDiligent requested a review from JSONbored as a code owner July 21, 2026 13:08
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

…SONbored#7771)

Narrow the bare catch to ENOENT on read so write failures surface as real CI errors. Export normalizeLcovSfPaths for unit tests; guard main() behind import.meta.url check.

Co-authored-by: Cursor <cursoragent@cursor.com>
@loopover-orb loopover-orb Bot closed this Jul 21, 2026
@loopover-orb

loopover-orb Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

This repository reviews pull requests one-shot: the PR must be correct as originally opened. Pushing an additional commit closes it automatically instead of restarting review — open a fresh pull request with every fix included.

@loopover-orb loopover-orb Bot added the review-evasion Gittensor contributor context label Jul 21, 2026
Co-authored-by: Cursor <cursoragent@cursor.com>
@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.57%. Comparing base (ea7da0c) to head (063c471).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7812   +/-   ##
=======================================
  Coverage   88.57%   88.57%           
=======================================
  Files         725      725           
  Lines       76409    76409           
  Branches    22762    22762           
=======================================
  Hits        67682    67682           
  Misses       7681     7681           
  Partials     1046     1046           
Flag Coverage Δ
shard-1 55.07% <ø> (-0.34%) ⬇️
shard-2 50.60% <ø> (-1.98%) ⬇️
shard-3 48.42% <ø> (+1.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review-evasion Gittensor contributor context

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rees-coverage.mjs's bare catch{} can mask a real lcov write failure as "report missing"

1 participant